package com.fesine.ch01.lesson08.suspendResumeNoSameValue;

/**
 * @Author: Fesine
 * @CreateDate:2016/6/27
 * @UpdateUser:修改人名称
 * @UpdateDate:2016/6/27
 * @UpdateRemark:修改具体的内容
 */
public class MyObject {
    private String username = "1";
    private String password = "11";

   public void setValue(String u, String p) {
        this.username = u;
        if (Thread.currentThread().getName().equals("a")) {
            System.out.println("停止a线程！");
            Thread.currentThread().suspend();
        }
        this.password = p;
    }

    public void printUsernamePassword() {
        System.out.println(username+" "+ password);
    }
}
